﻿using System;

class Program
{
    static void Main()
    {
        Console.Write("请输入第一个正整数 m：");
        int m = int.Parse(Console.ReadLine());
        Console.Write("请输入第二个正整数 n：");
        int n = int.Parse(Console.ReadLine());

        int a = m, b = n;
        while (b != 0)
        {
            int temp = b;
            b = a % b;
            a = temp;
        }
        int gcd = a;
        int lcm = m * n / gcd;

        Console.WriteLine($"最大公约数：{gcd}");
        Console.WriteLine($"最小公倍数：{lcm}");
    }
}